package com.ycxy.sh.transaction.service.impl;

import com.ycxy.sh.transaction.dao.entity.UserRole;
import com.ycxy.sh.transaction.mapper.UserRoleMapper;
import com.ycxy.sh.transaction.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hlt
 * @since 2019-12-21
 */
@Service
@Transactional
public class UserRoleServiceImpl implements UserRoleService {
    @Autowired
    private UserRoleMapper userRoleMapper;

    /**插入角色*/
    public Integer InsertUserRole(UserRole userRole){
        return userRoleMapper.Insert(userRole);
    }
    /**查询角色id*/
    public int LookUserRoleId(Long userid){
        return userRoleMapper.LookUserRoleId(userid);
    }
    /**修改用户的角色*/
    public void UpdateUserRole(UserRole userRole){
        userRoleMapper.Update(userRole);
    }
}
